<!DOCTYPE html>
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>System Install - MxsDoc</title>
	<script type="text/javascript" src="lang/en.js"></script>
    <link href="static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="static/webuploader/webuploader.css" rel="stylesheet">
    <link href="static/cropper/cropper.min.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet"> 
</head>
<body>
<div class="manual-reader">
    <header class="navbar navbar-static-top navbar-fixed-top manual-header" role="banner">
    <div class="container">
        
        <div class="navbar-header col-sm-12 col-md-9 col-lg-8">
            <a href="/DocSystem" class="navbar-brand" title="MxsDoc"><i class="fa fa-paper-plane"></i>MxsDoc</a>
            <nav class="collapse navbar-collapse col-sm-10">
                <div class="searchbar pull-left visible-lg-inline-block visible-md-inline-block">
                </div>
            </nav>
            
            <div class="btn-group dropdown-menu-right pull-right slidebar visible-xs-inline-block visible-sm-inline-block">
                <button class="btn btn-default dropdown-toggle hidden-lg" type="button" data-toggle="dropdown"><i class="fa fa-align-justify"></i></button>
                <ul class="dropdown-menu" role="menu">
                    <li>
                        <a onclick="docSysInit();" title="Enter System">Enter System</a>
                    </li>
                    
                </ul>
            </div>
        </div>
        
        <nav class="navbar-collapse hidden-xs hidden-sm" role="navigation">
            <ul class="nav navbar-nav navbar-right">
				<li id="enterSystemBtn">
                     <a onclick="docSysInit();" title="Enter System">Enter System</a>
                </li>          
            </ul>
        </nav>
        
    </div>
	</header>
    <div class="container manual-body">
        <div class="row">
            <div id="menu" class="page-left"  style="display:none">
                <ul class="menu">
                    <li id="dbConfigTag" class="active"><a href="javascript:PageSwitch('dbConfig')" class="item">Data Source</a> </li>  
                    <li id="sysConfigTag"><a href="javascript:PageSwitch('sysConfig')" class="item">System</a> </li>
                </ul>
            </div>
            <div id="dbConfig" class="page-right"   style="display:none">
                <div class="m-box">
                    <div class="box-head">
                        <strong class="box-title">Data Source</strong>
                        <span style="float:right">
                        <button id="btnEnableSystemDBSet" onclick="enableSystemDBSet();" class="btn btn-success" data-loading-text="Edit" style="margin-right:1px">Edit</button>
                        <button id="btnSaveSystemDBSet" onclick="saveSystemDBSet();" class="btn btn-success" data-loading-text="Save" style="margin-right:1px; display:none;">Save</button>
                        <button  id="btnCancelSystemDBSet" onclick="cancelSystemDBSet();" class="btn btn-warning" data-loading-text="Cancel" style="margin-right:1px; display:none;">Cancel</button>
                        </span>
                    </div>
                </div>
                <div class="box-body" style="padding-right: 200px;">
                    <div id="dbConfigForm">
                        <div class="form-group">
                            <label for="systemDbUrl">DB Type</label>
				            <select class="form-control" id="systemDbType" onchange="doSelectDbType();" disabled="disabled" >   
					            <option value="mysql">mysql</option>   
					            <option value="sqlite">sqlite</option>   
					        </select>
                        </div>
                        <div class="form-group">
                            <label for="systemDbUrl">DB URL</label>
                            <input type="text" name="systemDbUrl" id="systemDbUrl" class="form-control disabled" disabled="disabled" placeholder="DataBase URL">
                        </div>
                        <div class="form-group">
                            <label for="systemDbUser">DB User</label>
                            <input type="text" name="systemDbUser" id="systemDbUser" class="form-control disabled" disabled="disabled"  placeholder="DataBase Access user">
                        </div>
                        <div class="form-group">
                            <label for="systemDbPwd">DB Password</label>
                            <input type="text" name="systemDbPwd" id="systemDbPwd" class="form-control disabled" disabled="disabled"  placeholder="DataBase password">
                        </div>
                        <div class="form-group">
                            <button onclick="testDatabase();" class="btn btn-warning" data-loading-text="Test">Test</button>
                            <button onclick="exportDBData();" class="btn btn-warning" data-loading-text="Export">Export</button>
                            <button onclick="importDBData();" class="btn btn-warning" data-loading-text="Import">Import</button>
                            <button onclick="resetDatabaseConfirm();" class="btn btn-danger" data-loading-text="Reset">Reset</button>
                        </div>
                    </div>
                </div>
            </div>
            <div id="sysConfig" class="page-right" style="display:none">
                <div class="m-box">
                    <div class="box-head">
                        <strong class="box-title">System</strong>
                        <span style="float:right">
                        <button id="btnEnableSystemInfoSet" onclick="enableSystemInfoSet();" class="btn btn-success" data-loading-text="Edit" style="margin-right:1px">Edit</button>
                        <button id="btnSaveSystemInfoSet" onclick="saveSystemInfoSet();" class="btn btn-success" data-loading-text="Save" style="margin-right:1px; display:none;">Save</button>
                        <button id="btnCancelSystemInfoSet" onclick="cancelSystemInfoSet();" class="btn btn-warning" data-loading-text="Cancel" style="margin-right:1px; display:none;">Cancel</button>
                        </span>
                        
                    </div>
                </div>
                <div class="box-body" style="padding-right: 200px;">
                    <div class="form-left">
                        <div id="sysConfigForm">
                            <div class="form-group">
                                <label>Version</label>
                                <input type="text" class="form-control disabled" value="" id="version" name="version" disabled="disabled" placeholder="Version">
                            </div>
                            <div class="form-group">
                                <label>Server</label>
                                <input type="text" class="form-control disabled" value="" id="tomcatPath" name="tomcatPath" disabled="disabled" placeholder="Server Install Path">
  							</div>
                            <div class="form-group">
	                            <button onclick="restartTomcat();" class="btn btn-warning" data-loading-text="Restart">Restart</button>
	                        </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer">
</div>
</div>

<div style="display:none">
	<input id="uploadFiles" name="uploadFiles" type="file" onchange="importDBDataConfirm(event)" multiple="multiple"/>
</div>

<script src="static/scripts/jquery.min.js" type="text/javascript"></script>
<script src="static/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="static/webuploader/webuploader.min.js" type="text/javascript"></script>
<script src="static/cropper/cropper.min.js" type="text/javascript"></script>
<script src="static/scripts/jquery.form.js" type="text/javascript"></script>
<script src="js/main.js" type="text/javascript"></script>
<script type="text/javascript" src="static/bootstrapQ/qiao.js"></script>
<script src="js/DocSys.js" type="text/javascript"></script>
<script src="js/logon.js" type="text/javascript"></script>
<script src="js/md5.js"></script>
<script type="text/javascript" src="install.js"></script>
<script type="text/javascript">
    $(function () {
    	pageInit();
    });
</script>

</body></html>